
import struct

#处理客户端发送过来的接口消息

def userInfo(msg):    
    print("userInfo handler..",msg,msg.userId)

def resp_userInf(connectedClient):
    print("resp_userInf: connectedClient=",connectedClient)
    userId = connectedClient.socketId
    msg_byte = struct.pack('i',userId)
    msg_byte += bytes('你好!js,I am python!',encoding='utf8')
    return msg_byte
   
#import protoInfos  #因为和该模块存在循环引用的问题 所以在底部 import 